package gui;

import java.awt.BorderLayout;
import java.awt.EventQueue;

import javax.swing.JFrame;
import javax.swing.JPanel;
import javax.swing.border.EmptyBorder;
import java.awt.Window.Type;
import net.miginfocom.swing.MigLayout;
import javax.swing.JLabel;
import javax.swing.JTextField;
import javax.swing.JSeparator;
import javax.swing.JButton;
import java.awt.event.ActionListener;
import java.awt.event.ActionEvent;

public class EditClientGui extends JFrame {

	private JPanel contentPane;
	private JTextField firstNameField;
	private JTextField lastNameField;
	private JTextField addressField;
	private JTextField phoneNumberField;
	private JTextField emailField;
	/**
	 * Create the frame.
	 */
	public EditClientGui() {
		setTitle("New Client");
		setType(Type.UTILITY);
		setAlwaysOnTop(true);
		setDefaultCloseOperation(JFrame.DISPOSE_ON_CLOSE);
		setBounds(100, 100, 450, 300);
		contentPane = new JPanel();
		contentPane.setBorder(new EmptyBorder(5, 5, 5, 5));
		setContentPane(contentPane);
		contentPane.setLayout(new MigLayout("", "[][grow]", "[][][][][][][][][]"));
		
		JLabel lblCreateClient = new JLabel("Edit Client");
		contentPane.add(lblCreateClient, "cell 0 0 2 1,alignx center");
		
		JSeparator separator = new JSeparator();
		contentPane.add(separator, "cell 0 1 2 1");
		
		JLabel lblNewLabel = new JLabel("First Name:");
		contentPane.add(lblNewLabel, "cell 0 2,alignx trailing");
		
		firstNameField = new JTextField();
		contentPane.add(firstNameField, "cell 1 2,growx");
		firstNameField.setColumns(10);
		
		JLabel lblLastName = new JLabel("Last Name:");
		contentPane.add(lblLastName, "cell 0 3,alignx trailing");
		
		lastNameField = new JTextField();
		contentPane.add(lastNameField, "cell 1 3,growx");
		lastNameField.setColumns(10);
		
		JLabel lblAddres = new JLabel("Address:");
		contentPane.add(lblAddres, "cell 0 4,alignx trailing");
		
		addressField = new JTextField();
		contentPane.add(addressField, "cell 1 4,growx");
		addressField.setColumns(10);
		
		JLabel lblPhoneNumber = new JLabel("Phone number.:");
		contentPane.add(lblPhoneNumber, "cell 0 5,alignx trailing");
		
		phoneNumberField = new JTextField();
		contentPane.add(phoneNumberField, "cell 1 5,growx");
		phoneNumberField.setColumns(10);
		
		JLabel lblEmail = new JLabel("Email:");
		contentPane.add(lblEmail, "cell 0 6,alignx trailing");
		
		emailField = new JTextField();
		contentPane.add(emailField, "cell 1 6,growx");
		emailField.setColumns(10);
		
		JSeparator separator_1 = new JSeparator();
		contentPane.add(separator_1, "cell 0 7 2 1,growx");
		
		JButton btnAdd = new JButton("Add");
		contentPane.add(btnAdd, "cell 0 8");
		
		JButton btnCancel = new JButton("Cancel");
		btnCancel.addActionListener(new ActionListener() {
			public void actionPerformed(ActionEvent e) {
				dispose();
			}
		});
		contentPane.add(btnCancel, "cell 1 8");
	}

}
